<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0,maximum-scale=1.0" />
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/public.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="css/LArea.min.css"/>
    <title>邮寄地址</title>
</head>
<body>
	<div id="newAdd">
		<div class="addHeader">
			<span class="back"></span>
			<span class="title">新增地址</span>
			<span class="addBtn" onclick="confirm()">确定</span>
		</div>
		<div class="newList">
			<div class="list">
				<span class="listTitle">收件人姓名</span>
				<input type="text" name="name" class="name" value="" placeholder="请填写您的收件人姓名"/>
			</div>
			<div class="list region">
				<span class="listTitle">所在地区</span>
				<input id="region" type="text" readonly="" placeholder="城市选择特效"  value="广东省,深圳市,南山区"/>
			</div>
			<div class="list">
				<span class="listTitle">详细地址</span>
				<textarea name="listStreet" class="listStreet" placeholder="请填写您的详细地址"></textarea>
			</div>
			<div class="tips">
				<i>街道地址不能为空</i>
			</div>
			<div class="list">
				<span class="listTitle">邮政编码</span>
				<input type="text" name="ZipCode" class="ZipCode" value="" placeholder="请填写您的邮政编码"/>
			</div>
			<div class="tips">
				<i>邮编号码必须为6位数字</i>
			</div>
			<div class="list">
				<span class="listTitle">手机号</span>
				<input type="text" name="mobile" class="mobile" value="" placeholder="请填写您的手机号"/>
			</div>
			<div class="tips">
				<i>手机号码长度为11位数字</i>
			</div>
			<div class="list">
				<span class="listTitle">设为默认</span>
				<div class="check">
					<span class="circle"></span>
				</div>
			</div>
		</div>
	</div>
<script src="js/LArea.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/LAreaData1.js" type="text/javascript" charset="utf-8"></script>
<script src="js/LAreaData2.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	var on=false
	$('.check').on('click',function(){
		if (on==false) {
			$(this).addClass('checkOn')
			on=true
		} else{
			$(this).removeClass('checkOn')
			on=false
		}
	})
	
	var area1 = new LArea();
    area1.init({
        'trigger': '#region', //触发选择控件的文本框，同时选择完毕后name属性输出到该位置
        'valueTo': '#value1', //选择完毕后id属性输出到该位置
        'keys': {
            id: 'id',
            name: 'name'
        }, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
        'type': 1, //数据源类型
        'data': LAreaData //数据源
    });
    area1.value=[1,13,3];//控制初始位置，注意：该方法并不会影响到input的value
    
    
    //确定并跳回
    function confirm(){
    	window.location.href='invoiceAddress.html'
    }
    $(".back").click(function(){
		history.go(-1)
	})
</script>
</body>
</html>
